const util = require('../../utils/util.js')
let globalData = getApp().globalData
Page({
  data: {
    userInfo:null
  },
  onLoad: function(options) {
    if (globalData.userInfo==null) {
      wx.reLaunch({
        url: '/pages/login/login'
      })
    }

    this.setData({
      userInfo: globalData.userInfo
    })
    console.log(this.data.userInfo)
  },
  quitlogin:()=>{
    globalData.userInfo=null;
    wx.reLaunch({
      url: '/pages/login/login'
    })
  },
  myorder:()=>{
    wx.reLaunch({
      url: '/pages/myOrder/myOrder'
    })
  }
})